<template>
	<view class="htmlCenter">
		<view v-html="msg"></view>
		<u-icon class="close" name="close" color="#333" size="20" @tap="back"></u-icon>
	</view>
</template>
<script>
	import {
		getBySpmkey
	} from "@/api/login.js"
	export default {
		data() {
			return {
				msg: ""
			}
		},
		onLoad(option) {
			getBySpmkey({
				spmkey: option.type
			}).then(res => {
				if (res.data.success) {
					this.msg = res.data.obj.protocolContent;
				}
			})
		},
		methods: {
			back() {
				// history.back()
				uni.navigateBack()
			}
		}
	}
</script>
<style scoped>
	.htmlCenter {
		width: 100vw;
		padding: 30upx 40upx;
		color: #333;
		font-size: 26upx;
	}

	.close {
		position: fixed;
		right: 40upx;
		top: 40upx;
	}
</style>
